package wox.lonice.dto;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * <p>描述：用于api数据请求</p>
 *
 * @author LoNice
 * @Date 2018/5/28 10:54
 */
public class Result<T> {

    private boolean type;

    private T data;

    public Result() {
    }

    public Result(boolean type, T data) {
        this.type = type;
        this.data = data;
    }

    public boolean isType() {
        return type;
    }

    public void setType(boolean type) {
        this.type = type;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
